package br.com.tcc.dao;

import br.com.tcc.jpa.DataBaseManager;
import br.com.tcc.model.Combustivel;



public class CombustivelDAO {
	
	public void insert(Combustivel combustivel){

		DataBaseManager.entityManager.persist(combustivel);
	}
	
	public void update(Combustivel combustivel){
		
		DataBaseManager.entityManager.persist(combustivel);
		
	}

	public Combustivel find(int id){
		return	(Combustivel) DataBaseManager.entityManager.find(Combustivel.class, id);
		
	}
	
	public void delete(Combustivel combustivel){
		DataBaseManager.entityManager.remove(combustivel);
	}

}
